<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<head th:include="include :: header"></head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>回访列表</title>
<link href="../static/css/bootstrap.min.css"
	th:href="@{/css/bootstrap.min.css}" rel="stylesheet" />
<link href="../static/azxcrm/css/list.css"
	th:href="@{/azxcrm/css/list.css}" rel="stylesheet" />

<script src="js/bootstrap.js"></script>
<body>
	<div class="g-list">
		<!-- 头部结构 -->
		<div class="add_order clearfix">
			<div class="addorder_left clearfix">回访记录</div>
		</div>
		<!-- 头部结构 -->

		<div class="g-tab-list">
			<!--订单号-->
			<div id="myTabContent" class="tab-content">
				<div class="tab-pane fade in active" id="s-tab-1">
					<ul class="g-ul1 clearfix">
						<li><span>订单号</span><span
							th:text="${orderVisitRecord.orderNum}"></span></li>
						<li><span>订单类型</span><span
							th:text="${orderVisitRecord.order.typeName}"></span></li>
						<li><span>跟进客服</span><span
							th:text="${orderVisitRecord.serviceUserName}"></span></li>
					</ul>
					<!--订单号-->

					<!--拜访类型-->
					<form id="form-orderVisitRecord">
						<input id="recordId" name="recordId"
							th:value="${orderVisitRecord.recordId}" type="hidden">
						<div class="g-service-info  pos-rel">
							<ul class="g-ul2 clearfix">
								<li class="pos-rel"><span>拜访类型</span><span
									th:text="${orderVisitRecord.visitType}"></span>
									<a class="pos-ab customerHf" th:if="${orderVisitRecord.visitStatus} == 0" style="background: #ff0000;">未回访</a>
                                    <a class="pos-ab customerWhf" th:if="${orderVisitRecord.visitStatus} == 1" style="background: #6cb7f7;">已回访</a></li>
								<li><span>部门</span><span
									th:text="${orderVisitRecord.order.deptName}"></span></li>
								<li><span>业务员</span><span
									th:text="${orderVisitRecord.order.salesUserName}">刘杰</span></li>
								<li><span>拜访时间</span><span
									th:text="${orderVisitRecord.visitTime}"></span></li>
								<li><span>下次约定</span><span
									th:text="${orderVisitRecord.visitTimeNest}"></span></li>
								<li><span class="g-remark">沟通记录：</span><span
									class="g-proposal-data"
									th:text="${orderVisitRecord.visitRecord}"></span></li>
								<li><span class="g-remark">备注：</span><span
									class="g-proposal-data"
									th:text="${orderVisitRecord.visitRemark}"></span></li>
								<li class="g-li">
								<li th:if="${orderVisitRecord.vistitReturnRecord}!=null"><span
									class="g-remark">回访记录</span><span class="g-proposal-data"
									th:text="${orderVisitRecord.vistitReturnRecord}"></span></li>
								<li class="g-li"
									th:if="${orderVisitRecord.vistitReturnRecord}==null">
									<div class="form-group g-textarea clearfix">
										<label>回访记录</label>
										<textarea class="form-control" rows="3"
											name="vistitReturnRecord" id="vistitReturnRecord"
											style="resize: none"></textarea>
									</div>
									<div class="btn-group">
										<button type="submit" class="btn btn-warning dropdown-toggle">确定</button>
									</div>
								</li>
							</ul>
						</div>
					</form>
					
					<!-- 遍历拜访记录 -->
					<div class="g-service-info3  pos-rel" th:each="orderVisitRecords : ${orderVisitRecordList}" 
					       th:if="${orderVisitRecord.recordId} != ${orderVisitRecords.recordId}">
						<ul class="g-ul2 clearfix">
							<li class="pos-rel"><span>拜访类型</span><span th:text="${orderVisitRecords.visitType}"></span>
							      <a class="pos-ab customerHf" th:if="${orderVisitRecords.visitStatus} == 0" style="background: #ff0000;">未回访</a>
                                  <a class="pos-ab customerWhf" th:if="${orderVisitRecords.visitStatus} == 1" style="background: #6cb7f7;">已回访</a></li>
							<li><span>部门</span><span th:text="${orderVisitRecords.order.deptName}"></span></li>
							<li><span>业务员</span><span th:text="${orderVisitRecords.order.salesUserName}"></span></li>
							<li><span>拜访时间</span><span th:text="${orderVisitRecords.visitTime}"></span></li>
							<li class="yc"><span>下次约定</span><span th:text="${orderVisitRecords.visitTimeNest}"></span></li>
							<li class="yc"><span class="g-remark">沟通记录：</span><span
								class="g-proposal-data" th:text="${orderVisitRecords.visitRecord}"></span></li>
							<li class="yc"><span class="g-remark">备注：</span><span
								class="g-proposal-data" th:text="${orderVisitRecords.visitRemark}"></span></li>
							<li class="yc"><span class="g-remark">回访时间：</span><span
								class="g-proposal-data" th:text="${orderVisitRecords.vistitReturnTime}"></span></li>
							<li class="yc"><span class="g-remark">回访记录</span><span class="g-proposal-data"
                                    th:text="${orderVisitRecords.vistitReturnRecord}"></span></li>
						</ul>
						<a class="s-detail">查看详情</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<script src="/js/jquery-ui-1.10.4.min.js"
		th:src="@{/js/jquery-ui-1.10.4.min.js}"></script>
	<script src="/azxcrm/module/order/editOrderVisitRecord.js"
		th:src="@{/azxcrm/module/order/editOrderVisitRecord.js}"></script>
</body>
</html>
<script>
	$(function() {
		$(".s-detail").click(function() {
			if($(this).text()=='查看详情'){
				$(this).text('收起');
				$(this).siblings('.g-ul2').find(".yc").css('display','block')
			}else{
				$(this).text('查看详情');
				$(this).siblings('.g-ul2').find(".yc").css('display','none')
			}
		})
	})
</script>